<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>JSCODE</title>
<style>
html{
width:100%;
height:100%;
margin:0;
padding:0;
overflow:hidden;
}
body {
margin:0;
padding:0;
width:100%;
height:100%;
overflow:hidden;
font-size:12px;
font-family:"Andale Mono";
}
#main{
padding:10px 0 0 10px;
height:100%;
overflow:auto;
}
#pop_up{
position:absolute;
right:16px;
top:0;
padding:10px;
background:#fff;
overflow:auto;
border:1px solid #000;
}
dd{
margin-left:20px;
}
h2 a{
color:#006A00;
text-decoration:none;
}
h2 a:hover{
text-decoration:underline;
}
h3{
    color:#aaa;
}
.function_head{
    
}
.variable_head{

}
.example_html b{
    color:#0080C0;
}
p.description {
    border-left:3px solid #aaa;
    border-bottom:1px solid #aaa;
    padding-left:10px;
}
.code{
    border:1px solid #ccc;
    margin-top:5px;
    font-size:11px;
    background:#dedede;
    overflow:auto;
}
dl.item {
    margin-bottom:20px;
}
dl.item dt{
    margin-top:50px;
    background:#eee;
    margin-left:10px;
}
dl.item dt a{
    color:#FF7700;
}
dl.item dt b a{
    font-size:13px;
    color:#333;
    text-decoration:none;
}
dl.item dt b a:hover{
    font-size:13px;
    color:#333;
    text-decoration:underline;
}
li{border-bottom:1px dashed #ccc;line-height:25px}
li b{font-weight:normal}
#name_index{
    border-top:3px solid #ccc;
}
.c128{color:#ff0000}.c512{color:#004000}.c32{color:#008080}.c64{color:#949494}.c2{color:#ff0000}.c8{color:#008000}.c1{color:#0080c0}.c4{color:#ff8040}.c256{color:#000000}.c16{color:#800000}</style>
<script>
function view_source (a) {
    var c = a.parentNode.nextSibling;
    if (c.style.display == 'none') {
        c.style.display = 'block';
    } else {
        c.style.display = 'none';
    }
    return false;
}
</script>
</head>
<body>
<div id="main">
<dl class="item"><dt><b class="variable_head"><a href="#window.$break" name="window.$break">$break</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$break</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c2">Object</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  用于跳出的异常对象，参见：<a href='base.html#window.$continue'>$continue</a>;</p><h3>Example:</h3><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">collecter</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">count</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">[</b><b class="c128">1</b><b class="c16">,</b><b class="c128">2</b><b class="c16">,</b><b class="c128">3</b><b class="c16">,</b><b class="c128">4</b><b class="c16">,</b><b class="c128">5</b><b class="c16">,</b><b class="c128">6</b><b class="c16">,</b><b class="c128">7</b><b class="c16">,</b><b class="c128">8</b><b class="c8">]</b><b class="c8">.</b><b class="c256">each</b>&nbsp;<b class="c16">(</b><b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c4">value</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c4">value</b>&nbsp;<b class="c8">%</b>&nbsp;<b class="c128">2</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b><b class="c16">)</b>&nbsp;<b class="c1">throw</b>&nbsp;<b class="c256">$continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">collecter</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c4">value</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">+</b><b class="c8">+</b><b class="c256">count</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">2</b><b class="c16">)</b>&nbsp;<b class="c1">throw</b>&nbsp;<b class="c256">$break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c256">collecter</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//&nbsp;collecter&nbsp;=&nbsp;[2,4]</b></b></li></ol></fieldset></dd><dt><b class="variable_head"><a href="#window.$continue" name="window.$continue">$continue</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$continue</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c2">Object</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 跳出当前函数，继续下一次循环的异常对象，例子可参见<a href='base.html#window.$break'>$break</a>;<br/> </p></dd><dt><b class="variable_head"><a href="#window.$EXPORT" name="window.$EXPORT">$EXPORT</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$EXPORT</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c8">[</b><b class="c64">'Event'</b><b class="c16">,</b>&nbsp;<b class="c64">'Browser'</b><b class="c16">,</b>&nbsp;<b class="c64">'Effect.Transitions'</b><b class="c8">]</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 存储需要将部分属性导出到$作用域下的对象(参见：<a href='base.html#window.$export'>$export</a>)。<br/>(要导出的对象必须设置了EXPORT属性。属性值可以为字符串'all'及数组。'all'表示导出该对象的所有属性。数组则定义需要导出的属性)<br/> 默认导出参见： <a href='object.html#$.Event.EXPORT'>$.Event</a>, <a href='object.html#$.Browser.EXPORT'>$.Browser</a>, <a href='object.html#$.Effect.Transitions.EXPORT'>$.Effect.Transitions</a>;<br/> 例:<br/> $.Event设置了EXPORT属性，值为['observe', 'stopObserving', 'Keys'],<br/> 则导出后 $.observe，$.stopObserving, $.Keys 为 $.Event.observe, $.Event.stopObserving, $.Event.Keys的简单引用<br/> </p></dd><dt><b class="variable_head"><a href="#window.$version" name="window.$version">$version</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$version</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c128">20080722</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 版本号 <br/> 20080320: 修改Bug：当$('table[0] tr.Class1')为null时，$('table[0] tr.Class1 div')选择出错<br/> 20080321: 修改在Firefox下调用Ajax的Post方法而postBody没定义的话，出现401错误<br/> 20080330: 修改Browser对象相关属性的定义 isMoz=&gt;isGecko,  添加_$添加元素接口<br/> 20080407: 添加json请求<br/> 20080412: 修改$._$方法调用方式及部分Bug<br/> 20080517: 添加_$对象对空元素的支持，添加常用的Dom方法到_$.propoty对象上,修改html对单元素的默认操作<br/> 20080530: 添加$.Dom的常用方法至_$.prototype中，直接调用<br/> 20080704: $.Dom._class 方法正则式修改,以匹配class中的-符号<br/> 20080722: 添加$.Dom.bind方法，将$.Dom的方法绑定到_$中，提供_$中第一个元素的直接调用<br/> </p></dd><dt><b class="variable_head"><a href="#$.error" name="$.error">$.error</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">error</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c64">''</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 全局的错误信息存放变量 <br/> </p></dd><dt><b class="variable_head"><a href="#$.events" name="$.events">$.events</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">events</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c8">[</b><b class="c64">'abort'</b><b class="c16">,</b>&nbsp;<b class="c64">'blur'</b><b class="c16">,</b>&nbsp;<b class="c64">'change'</b><b class="c16">,</b>&nbsp;<b class="c64">'click'</b><b class="c16">,</b>&nbsp;<b class="c64">'dblclick'</b><b class="c16">,</b>&nbsp;<b class="c64">'error'</b><b class="c16">,</b>&nbsp;<b class="c64">'focus'</b><b class="c16">,</b>&nbsp;<b class="c64">'keydown'</b><b class="c16">,</b>&nbsp;<b class="c64">'keyup'</b><b class="c16">,</b>&nbsp;<b class="c64">'load'</b><b class="c16">,</b>&nbsp;<b class="c64">'mousedown'</b><b class="c16">,</b>&nbsp;<b class="c64">'mousemove'</b><b class="c16">,</b>&nbsp;<b class="c64">'mouseout'</b><b class="c16">,</b>&nbsp;<b class="c64">'mouseover'</b><b class="c16">,</b>&nbsp;<b class="c64">'mouseup'</b><b class="c16">,</b>&nbsp;<b class="c64">'reset'</b><b class="c16">,</b>&nbsp;<b class="c64">'resize'</b><b class="c16">,</b>&nbsp;<b class="c64">'scroll'</b><b class="c16">,</b>&nbsp;<b class="c64">'select'</b><b class="c16">,</b>&nbsp;<b class="c64">'submit'</b><b class="c16">,</b>&nbsp;<b class="c64">'unload'</b><b class="c8">]</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 事件类型<br/> </p></dd><dt><b class="variable_head"><a href="#$.props" name="$.props">$.props</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">props</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c64">"for"</b><b class="c8">:</b>&nbsp;<b class="c64">"htmlFor"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c64">"class"</b><b class="c8">:</b>&nbsp;<b class="c64">"className"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">value</b><b class="c8">:</b>&nbsp;<b class="c64">"value"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">disabled</b><b class="c8">:</b>&nbsp;<b class="c64">"disabled"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">checked</b><b class="c8">:</b>&nbsp;<b class="c64">"checked"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">readonly</b><b class="c8">:</b>&nbsp;<b class="c64">"readOnly"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">selected</b><b class="c8">:</b>&nbsp;<b class="c64">"selected"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">maxlength</b><b class="c8">:</b>&nbsp;<b class="c64">"maxLength"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">selectedIndex</b><b class="c8">:</b>&nbsp;<b class="c64">"selectedIndex"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">defaultValue</b><b class="c8">:</b>&nbsp;<b class="c64">"defaultValue"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">tagName</b><b class="c8">:</b>&nbsp;<b class="c64">"tagName"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">nodeName</b><b class="c8">:</b>&nbsp;<b class="c64">"nodeName"</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">childNodes</b><b class="c8">:</b>&nbsp;<b class="c64">'childNodes'</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">offsetWidth</b><b class="c8">:</b>&nbsp;<b class="c64">'offsetWidth'</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">offsetHeight</b><b class="c8">:</b>&nbsp;<b class="c64">'offsetHeight'</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> <a href='base.html#$.getAttribute'>$.getAttribute</a><br/> </p></dd><dt><b class="variable_head"><a href="#$.Effect.Transitions.EXPORT" name="$.Effect.Transitions.EXPORT">$.Effect.Transitions.EXPORT</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">EXPORT</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c64">'all'</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">i: 属性导出设置，参见: <a href='base.html#window.$export'>$export</a>;<br/> 	 </p></dd></dl><dl class="item"><dt><b class="function_head"><a name="window.$" href="#window.$">$</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c8">$</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">isObject</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c1">true</b><b class="c16">)</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c256">timespan</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c256">callback</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Timer</b><b class="c8">.</b><b class="c256">add</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">isObject</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c1">true</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">_class</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">__init</b><b class="c8">.</b><b class="c4">apply</b><b class="c16">(</b><b class="c1">this</b><b class="c16">,</b>&nbsp;<b class="c4">arguments</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">_class</b><b class="c8">.</b><b class="c4">prototype</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">_class</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">switch</b>&nbsp;<b class="c16">(</b><b class="c1">true</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">/*Builder&nbsp;Node*/</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c512">/^<(.|\n)+>$/</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Builder</b><b class="c8">.</b><b class="c256">node</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">/*ajax*/</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c512">/^(url|http)/i</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c8">[</b><b class="c64">'callback'</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">dataQuery</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/^url:/i</b><b class="c16">,</b>&nbsp;<b class="c64">''</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">Simple</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/^url:/i</b><b class="c16">,</b>&nbsp;<b class="c64">''</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c512">/^(get|post|json)/i</b><b class="c16">)</b><b class="c8">:</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">t_method</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">t_method</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'json'</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Json</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/^(json):/i</b><b class="c16">,</b>&nbsp;<b class="c64">''</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">Simple</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/^(get|post):/i</b><b class="c16">,</b>&nbsp;<b class="c64">''</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c16">{</b><b class="c4">method</b><b class="c8">:</b>&nbsp;&nbsp;<b class="c256">t_method</b><b class="c16">,</b>&nbsp;<b class="c256">onSuccess</b><b class="c8">:</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">postBody</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">/*Select&nbsp;Dom&nbsp;Nodes*/</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">default</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">es</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">';'</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">_es</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">getElements</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c256">trim</b><b class="c16">(</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">ret</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">_es</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">_es</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c256">ret</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">new</b>&nbsp;<b class="c256">_$</b><b class="c16">(</b><b class="c256">_es</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isObject</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isEvent</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c2">Event</b><b class="c8">.</b><b class="c256">Methods</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c2">Event</b><b class="c8">.</b><b class="c256">Methods</b><b class="c8">[</b><b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c8">]</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">[</b><b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">document</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">new</b>&nbsp;<b class="c256">_$</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isFunction</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isReady</b><b class="c16">)</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c8">$</b><b class="c8">.</b><b class="c256">ReadyList</b><b class="c16">)</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">ReadyList</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">ReadyList</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"><br/> 	该函数根据参数个数及类型的不同，执行不同的动作。<br/>	1, 不传入参数或传入一个普通对象（{}),则返回一个函数，其中对象中定义的是该函数的prototype属性。初始化函数为__init;<br/> 	2, 传入一个普通对象，且其中定义了timespan属性及callback属性时，则将该对象添加到定时器中.<br/>	3, 传入的第一个参数是string时，如果该string符合下列规则<br/>		3.1 一段HTML元素代码e.g. <b>&lt;div class="class1"&gt;</b>content<b>&lt;/div&gt;</b>，则返回生成的html_element对象<br/>		3.2 是一个url（以http开头或有前缀url:),则生成一个$.Ajax.Simple对象，如果存在参数2的话，其被参数$.Ajax.Simple构造函数中<br/>		3.3 元素选择描述字符串e.g.  "#id1 div.class1", "div .class2 &gt;span[title=something]"..., 返回一个_$对象<br/>	4, 传入的第一个参数是一个event对象，根据第二个参数att进行如下过程：<br/>		4.1 $.Event.Methods中的存在名字为att的方法，调用该函数，并将相关参数代入。返回结果<br/>		4.2 返回event 的属性att<br/>	5, 传入的第一个参数是一个html_element对象，返回一个_$对象<br/>	6, 传入的第一个参数是一个function, 将该function绑定到window.onload事件上</p><h3>Example:</h3><fieldset class="example_html"><legend>Html</legend><br/> 		<b>&lt;div class="c1"&gt;</b>		//node1<br/> 			<b>&lt;a class="c1 c2" href="http://www.baboo.com" rel="wan"&gt;</b>Baboo Home<b>&lt;/a&gt;</b> //node2<br/> 			<b>&lt;a class="c1 c3" href="http://www.baidu.com"&gt;</b>百度<b>&lt;/a&gt;</b> //node3<br/> 			<b>&lt;a class="c1 c4" href="http://www.google.com" rel="on"&gt;</b>Google<b>&lt;/a&gt;</b> //node4<br/> 			<b>&lt;a class="c2 c4" href="http://www.pp.tv" rel="off"&gt;</b>PP.tv<b>&lt;/a&gt;</b> //node5<br/> 		<b>&lt;/div&gt;</b><br/> 		<b>&lt;div id="p"&gt;</b>	//node6<br/> 			<b>&lt;h&gt;</b>title<b>&lt;/h&gt;</b>	//node7<br/> 			<b>&lt;div class="c5"&gt;</b>	//node8<br/> 				<b>&lt;div class="c6"&gt;</b>happy<b>&lt;/div&gt;</b>	//node9<br/> 			<b>&lt;/div&gt;</b><br/> 			<b>&lt;div class="c6"&gt;</b>angry<b>&lt;/div&gt;</b>	//node 10<br/> 		<b>&lt;/div&gt;</b><br/> 	</fieldset><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//元素选取</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#p'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//id=p的元素&nbsp;[node6]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'*.c1'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//包含类样式c1的任意元素&nbsp;[node1,&nbsp;node2,&nbsp;node3,&nbsp;node4]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'div'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//所有DIV元素&nbsp;[node1,&nbsp;node&nbsp;6,&nbsp;node8,&nbsp;node9,&nbsp;node10]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#p&nbsp;;&nbsp;*.c1'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//id=p的元素和包含样式c1的任意元素&nbsp;[node6,&nbsp;node1,&nbsp;node2,&nbsp;node3,&nbsp;node4]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[rel=wan]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//包含属性且值等于wan的元素&nbsp;[node2]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[@rel]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//包含属性rel的A元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[rel&nbsp;^=&nbsp;w]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//包含属性rel且值以w开始的A元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[rel&nbsp;$=&nbsp;n]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//包含属性rel且值以n结尾的A元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[0]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node2]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[1..2]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node3,&nbsp;node4]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[2..:last]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node4,&nbsp;node5]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[2..:last-1]'</b><b class="c16">)</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node4]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[:first..2]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node2,&nbsp;node3,&nbsp;node4]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a[:last]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node5]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#p&nbsp;&gt;div'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//id=p的元素的&nbsp;所有子DIV元素&nbsp;[node8,&nbsp;node10]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#p&nbsp;div.c5&nbsp;*.c6'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//[node9]</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'a'</b><b class="c16">,</b>&nbsp;<b class="c256">e</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//e元素包含的所有A元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//元素创建</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'&lt;div&nbsp;class="c1"&nbsp;style="color:red"&gt;&lt;h&gt;Hello&lt;/h&gt;&lt;/div&gt;'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//返回一个DIV元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//类创建</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c1">class</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">__init</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c64">'inited'</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">fun</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c4">alert</b><b class="c16">(</b><b class="c64">'fun'</b><b class="c16">)</b><b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">instance</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">new</b>&nbsp;<b class="c1">class</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//alert('inited');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">instance</b><b class="c8">.</b><b class="c256">fun</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//alert('fun');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//事件函数调用</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c4">event</b><b class="c16">,</b>&nbsp;<b class="c64">'x'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//返回事件发生的页面x座标</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//domready事件绑定</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c1">function</b><b class="c16">(</b><b class="c16">)</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c64">'domready!'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//定时调用</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">timespan</b><b class="c8">:</b>&nbsp;&nbsp;<b class="c128">2</b><b class="c16">,</b>&nbsp;<b class="c32">//2秒后调用callback函数</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">callback</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c4">alert</b><b class="c16">(</b><b class="c64">'called'</b><b class="c16">)</b><b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//loop&nbsp;:&nbsp;false&nbsp;&nbsp;&nbsp;&nbsp;//只调用一次还是循环调用</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//Ajax</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'http://www.baboo.com/ajax.php'</b><b class="c16">,</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">http</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c4">alert</b><b class="c16">(</b><b class="c256">http</b><b class="c8">.</b><b class="c256">responseText</b><b class="c16">)</b><b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'get:a.php'</b><b class="c16">,</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">http</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'json:b.js'</b><b class="c16">,</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">json</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//为一个Dom&nbsp;element创建一个_$对象</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c4">document</b><b class="c8">.</b><b class="c256">getElementById</b><b class="c16">(</b><b class="c64">'foo'</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="window.$A" href="#window.$A">$A</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$A</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">o</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 传入一个可枚举的对象，输出一个组数对象。</p><h3>Example:</h3><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">function</b>&nbsp;<b class="c256">foo</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c4">typeof</b>&nbsp;<b class="c256">args</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//&nbsp;'array'</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">firstArg</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">pop</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="window.$E" href="#window.$E">$E</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$E</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">e</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">$</b><b class="c16">(</b>&nbsp;<b class="c64">'#'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">e</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b><b class="c16">(</b><b class="c256">e</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">new</b>&nbsp;<b class="c256">_$</b><b class="c16">(</b><b class="c256">e</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">e</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 传入一个HTML Element，输出一个_$对象.</p><h3>Example:</h3><fieldset class="example_html"><legend>Html</legend><br/> 	<b>&lt;div id="foo"&gt;</b><b>&lt;/div&gt;</b><br/> 	</fieldset><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">foo</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//获取相同的东西</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">foo</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$E</b><b class="c16">(</b><b class="c64">'foo'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">foo</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$E</b><b class="c16">(</b><b class="c256">documnet</b><b class="c8">.</b><b class="c256">getElementById</b><b class="c16">(</b><b class="c64">'foo'</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">foo</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#foo'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">foo</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$E</b><b class="c16">(</b><b class="c256">foo</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//_$对象直接返回</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="window.$export" href="#window.$export">$export</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c4">window</b><b class="c8">.</b><b class="c256">$export</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">toExport</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c4">arguments</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c256">$EXPORT</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">toExport</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ns</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">toExport</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">'.'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c16">,</b>&nbsp;<b class="c256">findO</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">true</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">ns</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">ns</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">findO</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">findO</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b><b class="c16">)</b>&nbsp;<b class="c1">continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c8">.</b><b class="c4">toLowerCase</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'all'</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">pro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">pro</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'EXPORT'</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">!</b>&nbsp;<b class="c16">(</b><b class="c256">pro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c8">$</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c8">$</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">pro</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">pro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c16">(</b><b class="c256">pro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c8">$</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c8">$</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isArray</b><b class="c16">(</b><b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b><b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">pro</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">EXPORT</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">npro</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c512">/^(.+)=>(.+)$/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">pro</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">pro</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">npro</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$2</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">npro</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">pro</b>&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b>&nbsp;<b class="c16">(</b><b class="c256">npro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c8">$</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isFunction</b><b class="c16">(</b><b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">[</b><b class="c256">npro</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c8">.</b><b class="c256">bind</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">[</b><b class="c256">npro</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"><br/> 	 将对象属性导入到$作用域下(如果$作用域下已存在同名的属性，则不能覆盖。<br/> 	 默认导出由<a href='base.html#window.$EXPORT'>$EXPORT</a>变量中定义的对象。如果传递了参数则导出参数中定义的对象。<br/> 	 自定义导入需要传入参数，参数为$作用域下的一个对象名的字符串(名称路径中不包含$)，例：Builder, Effect.Transtions...</p><h3>Example:</h3><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//将$.Builder.node方法导出至$下</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Builder</b><b class="c8">.</b><b class="c256">EXPORT</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c64">'node'</b><b class="c16">;</b>&nbsp;<b class="c32">//&nbsp;or&nbsp;$.Builder.EXPORT&nbsp;=&nbsp;['node']</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">$export</b><b class="c16">(</b><b class="c64">'Builder'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">node</b><b class="c16">(</b><b class="c64">'&lt;div&gt;hello,world&lt;/div&gt;'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//现在可以直接使用$.node来代替$.Builder.node</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="$.clone" href="#$.clone">$.clone</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">clone</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">d</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">new</b>&nbsp;<b class="c256">d</b><b class="c8">.</b><b class="c256">constructor</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">pro</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c256">d</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">d</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c256">o</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">d</b><b class="c8">[</b><b class="c256">pro</b><b class="c8">]</b><b class="c16">;</b>&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c4">arguments</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">extend</b><b class="c16">(</b><b class="c256">o</b><b class="c16">,</b>&nbsp;<b class="c4">arguments</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  clone对象d, 如果传入了第二个参数，则对新生成的对象进行扩展<br/> </p></dd><dt><b class="function_head"><a name="$.dataQuery" href="#$.dataQuery">$.dataQuery</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">dataQuery</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">url</b><b class="c16">,</b>&nbsp;<b class="c256">sets</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">sets</b><b class="c16">)</b>&nbsp;<b class="c256">sets</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">cacheID</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">cacheID</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">url</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">cacheID</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">cache</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c16">(</b><b class="c256">sets</b><b class="c8">[</b><b class="c64">'callback'</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b><b class="c16">)</b><b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">cache</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">querying</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">querying</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">true</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">new</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">Simple</b><b class="c16">(</b><b class="c256">url</b><b class="c16">,</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">method</b><b class="c8">:</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c4">method</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c64">'get'</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">onSuccess</b><b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">t</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c4">data</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">sets</b><b class="c8">[</b><b class="c64">'process'</b><b class="c8">]</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">sets</b><b class="c8">[</b><b class="c64">'process'</b><b class="c8">]</b><b class="c16">(</b><b class="c256">t</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">t</b><b class="c8">.</b><b class="c256">responseText</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">sets</b><b class="c8">.</b><b class="c256">noCache</b><b class="c16">)</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">cache</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">data</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">delete</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">querying</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">(</b><b class="c256">sets</b><b class="c8">[</b><b class="c64">'callback'</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">)</b><b class="c16">(</b><b class="c4">data</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">,</b>&nbsp;<b class="c256">onFailure</b><b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">delete</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Ajax</b><b class="c8">.</b><b class="c256">querying</b><b class="c8">[</b><b class="c256">cacheID</b><b class="c8">]</b><b class="c16">;</b><b class="c16">(</b><b class="c256">sets</b><b class="c8">[</b><b class="c64">'onerror'</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b><b class="c16">)</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 具有缓存性质的Ajax数据请求<br/> <br/>  </p></dd><dt><b class="function_head"><a name="$.doException" href="#$.doException">$.doException</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">doException</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 全局的异常处理函数，默认什么也不做，可以按需要重载它<br/> </p></dd><dt><b class="function_head"><a name="$.effect" href="#$.effect">$.effect</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">effect</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">sets</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">clone</b><b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">DefaultSets</b><b class="c16">,</b>&nbsp;<b class="c256">sets</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.empty" href="#$.empty">$.empty</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 空函数，什么也不做，一般用作为缺省的函数参数<br/> </p></dd><dt><b class="function_head"><a name="$.extend" href="#$.extend">$.extend</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">extend</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">d</b><b class="c16">,</b>&nbsp;<b class="c256">s</b><b class="c16">,</b>&nbsp;<b class="c256">flag</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">p</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c256">s</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">flag</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">p</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c256">d</b><b class="c16">)</b>&nbsp;<b class="c1">continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">d</b><b class="c8">[</b><b class="c256">p</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">s</b><b class="c8">[</b><b class="c256">p</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">d</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  将对象s的属性扩展进对象d中，如果设置了flag，则不覆盖已存在的属性<br/> </p></dd><dt><b class="function_head"><a name="$.getAttribute" href="#$.getAttribute">$.getAttribute</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c4">getAttribute</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">e</b><b class="c16">,</b>&nbsp;<b class="c4">name</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">props</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">props</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">props</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">e</b><b class="c8">[</b><b class="c256">props</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Browser</b><b class="c8">.</b><b class="c256">IE</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">/</b><b class="c4">src</b><b class="c8">|</b><b class="c4">href</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c4">name</b><b class="c8">.</b><b class="c4">toLowerCase</b><b class="c16">(</b><b class="c16">)</b><b class="c16">)</b><b class="c16">)</b>&nbsp;&nbsp;<b class="c1">return</b>&nbsp;&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c4">getAttribute</b>&nbsp;<b class="c16">(</b><b class="c4">name</b><b class="c16">,</b>&nbsp;<b class="c128">2</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c8">.</b><b class="c4">tagName</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'SELECT'</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c4">name</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'value'</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c4">options</b><b class="c8">[</b><b class="c256">e</b><b class="c8">.</b><b class="c4">selectedIndex</b><b class="c8">]</b><b class="c8">.</b><b class="c4">value</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c8">.</b><b class="c256">attributes</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c256">attributes</b>&nbsp;<b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c8">.</b><b class="c256">nodeValue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c4">getAttribute</b><b class="c16">(</b><b class="c4">name</b><b class="c16">)</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 获取一个Dom Element的属性，参见：<a href='base.html#$.setAttribute'>$.setAttribute</a>;<br/> </p></dd><dt><b class="function_head"><a name="$.getElements" href="#$.getElements">$.getElements</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">getElements</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">_atts</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">_attCollect</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">a</b><b class="c16">,</b>&nbsp;<b class="c256">b</b><b class="c16">,</b>&nbsp;<b class="c256">c</b><b class="c16">,</b>&nbsp;<b class="c256">d</b><b class="c16">,</b>&nbsp;<b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">att</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">e</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c64">'className='</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">c</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">b</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">_atts</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">att</b><b class="c16">)</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c128">1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c64">'['</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c64">']'</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">getElementsByAttribute</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">es</b><b class="c16">,</b>&nbsp;<b class="c256">attsStr</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">atts</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">attsStr</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">']['</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">atts</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">attPart</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">_atts</b><b class="c8">[</b><b class="c256">atts</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">switch</b>&nbsp;<b class="c16">(</b><b class="c1">true</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c8">/</b><b class="c8">^</b><b class="c8">[</b><b class="c8">\</b><b class="c256">d</b><b class="c8">\</b><b class="c256">s</b><b class="c16">,</b><b class="c8">]</b><b class="c8">+</b><b class="c8">$</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">attPart</b><b class="c16">)</b><b class="c8">:</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ma</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">attPart</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">','</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">ma</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">parseInt</b><b class="c16">(</b><b class="c256">ma</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b><b class="c16">(</b><b class="c256">es</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">></b>&nbsp;<b class="c4">index</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c8">/</b><b class="c8">^</b><b class="c8">:</b><b class="c16">(</b><b class="c8">\</b><b class="c256">w</b><b class="c8">+</b><b class="c16">)</b><b class="c8">$</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">attPart</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">switch</b><b class="c16">(</b><b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c8">.</b><b class="c4">toLowerCase</b><b class="c16">(</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'first'</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'last'</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">.</b><b class="c256">last</b><b class="c16">(</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c1">break</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c8">/</b><b class="c8">^</b><b class="c16">(</b><b class="c16">(</b><b class="c8">?</b><b class="c8">:</b><b class="c8">:</b><b class="c256">first</b><b class="c8">|</b><b class="c8">\</b><b class="c256">d</b><b class="c8">+</b><b class="c16">)</b><b class="c16">)</b><b class="c8">\</b><b class="c8">.</b><b class="c8">\</b><b class="c8">.</b><b class="c16">(</b><b class="c16">(</b><b class="c8">?</b><b class="c8">:</b><b class="c8">:</b><b class="c256">last</b><b class="c8">|</b><b class="c8">\</b><b class="c256">d</b><b class="c8">+</b><b class="c16">)</b><b class="c16">(</b><b class="c8">?</b><b class="c8">:</b><b class="c8">\</b><b class="c256">s</b><b class="c8">*</b><b class="c8">-</b><b class="c8">\</b><b class="c256">s</b><b class="c8">*</b><b class="c8">\</b><b class="c256">d</b><b class="c8">+</b><b class="c16">)</b><b class="c8">?</b><b class="c16">)</b><b class="c8">$</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">attPart</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">parts</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">attPart</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">'..'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">start</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">parts</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">':first'</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c128">0</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c4">parseInt</b><b class="c16">(</b><b class="c256">parts</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c128">10</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">end</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">eval</b><b class="c16">(</b><b class="c256">parts</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/:last/</b><b class="c16">,</b>&nbsp;<b class="c256">es</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c128">1</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">start</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b><b class="c8">=</b>&nbsp;<b class="c256">end</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b><b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c8">/</b><b class="c8">^</b><b class="c16">(</b><b class="c8">\</b><b class="c256">w</b><b class="c8">+</b><b class="c16">)</b><b class="c8">\</b><b class="c256">s</b><b class="c8">*</b><b class="c16">(</b><b class="c8">\</b><b class="c8">!</b><b class="c8">|</b><b class="c8">\</b><b class="c8">^</b><b class="c8">|</b><b class="c8">\</b><b class="c8">$</b><b class="c8">|</b><b class="c8">\</b><b class="c8">*</b><b class="c16">)</b><b class="c8">?</b><b class="c8">=</b><b class="c8">\</b><b class="c256">s</b><b class="c8">*</b><b class="c16">(</b><b class="c8">.</b><b class="c8">+</b><b class="c16">)</b><b class="c8">$</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">attPart</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">att</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c16">,</b>&nbsp;<b class="c256">etype</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$2</b><b class="c16">,</b>&nbsp;<b class="c256">vl</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$3</b><b class="c16">,</b>&nbsp;<b class="c256">testBool</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">att</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'className'</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">className</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c8">new</b>&nbsp;<b class="c2">RegExp</b><b class="c16">(</b>&nbsp;<b class="c64">'(^|\\s+)'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">vl</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c64">'(\\s+|$)'</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">testBool</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">attVal</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c4">getAttribute</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">att</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">true</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">null</b><b class="c16">)</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">else</b>&nbsp;<b class="c256">attVal</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">String</b><b class="c16">(</b><b class="c256">attVal</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">switch</b>&nbsp;<b class="c16">(</b><b class="c256">etype</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'!'</b>&nbsp;<b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c256">vl</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'^'</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b><b class="c8">.</b><b class="c4">indexOf</b><b class="c16">(</b><b class="c256">vl</b><b class="c16">)</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'$'</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b><b class="c8">.</b><b class="c4">indexOf</b><b class="c16">(</b><b class="c256">vl</b><b class="c16">)</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">vl</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">attVal</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'*'</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b><b class="c8">.</b><b class="c4">indexOf</b><b class="c16">(</b><b class="c256">vl</b><b class="c16">)</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c8">-</b><b class="c128">1</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">default</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">testBool</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">hasAtt</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">attVal</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">vl</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">testBool</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c8">/</b><b class="c8">^</b><b class="c8">@</b><b class="c16">(</b><b class="c8">\</b><b class="c256">w</b><b class="c8">+</b><b class="c16">)</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">attPart</b><b class="c16">)</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">attName</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">es</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c4">getAttribute</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">attName</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">es</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">j</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c256">atts</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c128">1</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">es</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">path</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ps</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">path</b><b class="c8">.</b><b class="c256">trim</b><b class="c16">(</b><b class="c16">)</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/\[([^\]]+)\]/g</b><b class="c16">,</b>&nbsp;<b class="c256">_attCollect</b><b class="c16">)</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/(\.)([\w-]+)/g</b><b class="c16">,</b>&nbsp;<b class="c256">_attCollect</b><b class="c16">)</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">'&nbsp;'</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">stack1</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">stack2</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">ps</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">ps</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">''</b><b class="c16">)</b>&nbsp;<b class="c1">continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">p</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ps</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ma</b>&nbsp;<b class="c8">=</b>&nbsp;&nbsp;<b class="c256">p</b><b class="c8">.</b><b class="c4">match</b><b class="c16">(</b><b class="c512">/^([#>]?)([\w-]+|\*)(?:\[(.+)\])?$/</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">ma</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">error</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c64">'wrong&nbsp;format:'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">path</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">_atts</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">stack1</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">i</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack1</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c4">arguments</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c4">document</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">switch</b>&nbsp;<b class="c16">(</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">''</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">stack1</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">temp</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c256">stack1</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c8">.</b><b class="c256">getElementsByTagName</b><b class="c16">(</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">temp</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">stack2</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">temp</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'#'</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">delete</b>&nbsp;<b class="c256">stack1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack1</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">e</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">document</b><b class="c8">.</b><b class="c256">getElementById</b><b class="c16">(</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack2</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">e</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c8">[</b><b class="c256">e</b><b class="c8">]</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">case</b>&nbsp;<b class="c64">'&gt;'</b><b class="c8">:</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">tag</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ma</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c8">.</b><b class="c4">toUpperCase</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">stack1</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c4">children</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">stack1</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c8">.</b><b class="c256">childNodes</b><b class="c16">,</b>&nbsp;<b class="c256">temp</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">k</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">k</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c4">children</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">k</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b><b class="c16">(</b><b class="c4">children</b><b class="c8">[</b><b class="c256">k</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c4">children</b><b class="c8">[</b><b class="c256">k</b><b class="c8">]</b><b class="c8">.</b><b class="c256">nodeName</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">tag</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c256">tag</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'*'</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">temp</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c4">children</b><b class="c8">[</b><b class="c256">k</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">temp</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">stack2</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">temp</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">break</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">stack2</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">_atts</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b>&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">delete</b>&nbsp;<b class="c256">stack1</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack1</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">stack2</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">j</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack1</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">stack1</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">3</b><b class="c8">]</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">getElementsByAttribute</b><b class="c16">(</b><b class="c256">stack2</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">ma</b><b class="c8">[</b><b class="c128">3</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">stack2</b><b class="c8">[</b><b class="c256">j</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">delete</b>&nbsp;<b class="c256">stack2</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">stack2</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">_atts</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">stack1</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 节点选择方法，传入路径参数，一般通过<a href='base.html#window.$'>$</a>的Dom元素选取方法间接调用</p><h3>Example:</h3><fieldset class="example_html"><legend>Html</legend><br/> 		<b>&lt;div id="main"&gt;</b><br/> 			<b>&lt;span class="c1"&gt;</b><b>&lt;b&gt;</b>h<b>&lt;/b&gt;</b><b>&lt;i&gt;</b>o<b>&lt;/i&gt;</b><b>&lt;b&gt;</b>w<b>&lt;/b&gt;</b><b>&lt;/span&gt;</b><br/> 			<b>&lt;div class="c1 c2"&gt;</b><b>&lt;/div&gt;</b><br/> 			<b>&lt;input type="text" value="c"/&gt;</b><br/> 			<b>&lt;input rel="my rel" name="checkbox_group" type="checkbox" value="check1" checked/&gt;</b><br/> 			<b>&lt;input rel="thx"  name="checkbox_group" type="checkbox" value="check2"/&gt;</b><br/> 			<b>&lt;input  name="checkbox_group" type="checkbox" value="check3"/&gt;</b><br/> 			<b>&lt;select name="sel"&gt;</b><br/> 				<b>&lt;option value="1"&gt;</b>1<b>&lt;/option&gt;</b><br/> 				<b>&lt;option value="2"/&gt;</b>2<b>&lt;/opiton&gt;</b><br/> 				<b>&lt;option value="3"/&gt;</b>3<b>&lt;/option&gt;</b><br/> 			<b>&lt;/sel&gt;</b><br/> 		<b>&lt;/div&gt;</b><br/> 	</fieldset><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#main'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取ID值等于main的元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'*'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有tagName&nbsp;==&nbsp;'input'的元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[1]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有tagName&nbsp;==&nbsp;'input'的元素中的第2个</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[:last]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有tagName&nbsp;==&nbsp;'input'的元素中的最后一个(注：:last最后一个索引位置的名称，:first第一个索引位置的名称</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[0..2]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有tagName&nbsp;==&nbsp;'input'的元素中的第1~3个</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取所有type=text的input元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'select&nbsp;option[selected=true]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=checkbox][checked=true]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[@rel]'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取拥有属性rel的input元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[rel=thx]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[rel^=my]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[rel$=rel]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[rel*=e]'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'*.c1'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'*.c1.c2'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#main&nbsp;&gt;div'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取id为main的元素下的子节点中tagName==div的元素</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//总结：</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//ID选择&nbsp;$('#main');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//tagName选择&nbsp;$('a');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//类选择&nbsp;$('a.class1');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//子节点选择$('a&nbsp;&gt;b.class2');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//范围选择&nbsp;$('span[0..2]'),&nbsp;$('span[0..:last-1]'),&nbsp;$('span&nbsp;a[1]');</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//属性选择&nbsp;$('a[href*=baidu]'),&nbsp;$('a[@rel]'),&nbsp;...</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="$.getElementsByClassName" href="#$.getElementsByClassName">$.getElementsByClassName</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">getElementsByClassName</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c4">className</b><b class="c16">,</b>&nbsp;<b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">.</b><b class="c256">_elementsWithClass</b><b class="c16">(</b><b class="c256">e</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c4">document</b><b class="c16">,</b>&nbsp;<b class="c4">className</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.geval" href="#$.geval">$.geval</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">geval</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">s</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">try</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b><b class="c16">(</b><b class="c4">window</b><b class="c8">.</b><b class="c256">execScript</b><b class="c16">)</b>&nbsp;<b class="c4">window</b><b class="c8">.</b><b class="c256">execScript</b><b class="c16">(</b><b class="c256">s</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">else</b>&nbsp;<b class="c4">window</b><b class="c8">.</b><b class="c4">eval</b><b class="c16">(</b><b class="c256">s</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">true</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">catch</b><b class="c16">(</b><b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">doException</b><b class="c16">(</b><b class="c64">'$.geval'</b><b class="c16">,</b>&nbsp;<b class="c256">e</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  window作用哉中eval脚本<br/> </p></dd><dt><b class="function_head"><a name="$.gid" href="#$.gid">$.gid</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">gid</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c64">'GID'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c16">(</b><b class="c256">$gidbase</b><b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 生成一个全局内惟一的字符串<br/> </p></dd><dt><b class="function_head"><a name="$.isArray" href="#$.isArray">$.isArray</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isArray</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">constructor</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c2">Array</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个数组<br/> </p></dd><dt><b class="function_head"><a name="$.isElement" href="#$.isElement">$.isElement</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">nodeType</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个html element对象<br/> </p></dd><dt><b class="function_head"><a name="$.isEvent" href="#$.isEvent">$.isEvent</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isEvent</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">!</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c4">type</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">events</b><b class="c8">.</b><b class="c256">include</b><b class="c16">(</b><b class="c256">o</b><b class="c8">.</b><b class="c4">type</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个事件对象<br/> </p></dd><dt><b class="function_head"><a name="$.isFunction" href="#$.isFunction">$.isFunction</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isFunction</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c4">typeof</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'function'</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个函数<br/> </p></dd><dt><b class="function_head"><a name="$.isNumber" href="#$.isNumber">$.isNumber</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isNumber</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">constructor</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c2">Number</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个数值对象<br/> </p></dd><dt><b class="function_head"><a name="$.isObject" href="#$.isObject">$.isObject</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isObject</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">,</b>&nbsp;<b class="c256">flag</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">flag</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c16">(</b><b class="c256">o</b><b class="c8">.</b><b class="c256">constructor</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c2">Object</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">!</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isEvent</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">!</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isElement</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c4">typeof</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'object'</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个对象，如果设置了flag为真的话，则判断该变量是一个{}类型的对象。<br/> </p></dd><dt><b class="function_head"><a name="$.isString" href="#$.isString">$.isString</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">o</b><b class="c8">.</b><b class="c256">constructor</b>&nbsp;<b class="c8">=</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c2">String</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个字符串对象<br/> </p></dd><dt><b class="function_head"><a name="$.isStringOrNumber" href="#$.isStringOrNumber">$.isStringOrNumber</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">isStringOrNumber</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">[</b><b class="c64">'string'</b><b class="c16">,</b>&nbsp;<b class="c64">'number'</b><b class="c8">]</b><b class="c8">.</b><b class="c256">include</b><b class="c16">(</b><b class="c4">typeof</b>&nbsp;<b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断变量是否是一个数值对象或字符串对象<br/> </p></dd><dt><b class="function_head"><a name="$.jeval" href="#$.jeval">$.jeval</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">jeval</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">t</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">try</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c4">eval</b><b class="c16">(</b><b class="c64">'('</b>&nbsp;<b class="c8">+</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">t</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c64">')'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">catch</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">doException</b><b class="c16">(</b><b class="c64">'$.jeval'</b><b class="c16">,</b>&nbsp;<b class="c256">e</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  eval json字符串, 异常返回false<br/> </p></dd><dt><b class="function_head"><a name="$.K" href="#$.K">$.K</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">K</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">k</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">k</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 辅助函数，传入什么，返回什么<br/> </p></dd><dt><b class="function_head"><a name="$.require" href="#$.require">$.require</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">require</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c8">/</b><b class="c8">^</b><b class="c16">(</b><b class="c8">\</b><b class="c8">$</b><b class="c8">|</b><b class="c8">\</b><b class="c256">w</b><b class="c8">+</b><b class="c16">)</b><b class="c8">\</b><b class="c256">s</b><b class="c8">+</b><b class="c16">(</b><b class="c8">\</b><b class="c256">d</b><b class="c8">+</b><b class="c16">)</b><b class="c8">$</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c4">arguments</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">throw</b>&nbsp;<b class="c64">"invalid&nbsp;argument&nbsp;"</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c4">arguments</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c64">"&nbsp;for&nbsp;$.require!"</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">v</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'$'</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">$version</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">[</b><b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c8">]</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">[</b><b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b><b class="c8">]</b><b class="c8">.</b><b class="c256">version</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c128">0</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">rv</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">parseInt</b><b class="c16">(</b><b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$2</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">rv</b>&nbsp;<b class="c8">></b>&nbsp;<b class="c256">v</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">throw</b>&nbsp;<b class="c8">[</b><b class="c64">'Version&nbsp;too&nbsp;low:$.'</b><b class="c16">,</b>&nbsp;<b class="c4">arguments</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c64">''</b><b class="c16">,</b>&nbsp;<b class="c64">'&nbsp;require&nbsp;'</b><b class="c16">,</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$1</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'$'</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c64">'dollar'</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c16">(</b><b class="c64">'$.'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c2">RegExp</b><b class="c8">.</b><b class="c256">$2</b><b class="c16">)</b><b class="c16">,</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c64">'&nbsp;version&nbsp;'</b><b class="c16">,</b>&nbsp;<b class="c256">rv</b><b class="c16">,</b>&nbsp;<b class="c64">',&nbsp;but&nbsp;version&nbsp;is&nbsp;'</b><b class="c16">,</b>&nbsp;<b class="c256">v</b><b class="c8">]</b><b class="c8">.</b><b class="c4">join</b><b class="c16">(</b><b class="c64">''</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 判断模块要求的库版本是否符合要求<br/> </p></dd><dt><b class="function_head"><a name="$.run" href="#$.run">$.run</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">run</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">o</b><b class="c16">)</b>&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c4">eval</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isFunction</b><b class="c16">(</b><b class="c256">o</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">o</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  如果传递一个函数，则直接调用它；如果传递进一个字符串，eval它<br/> </p></dd><dt><b class="function_head"><a name="$.setAttribute" href="#$.setAttribute">$.setAttribute</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c4">setAttribute</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">e</b><b class="c16">,</b>&nbsp;<b class="c4">name</b><b class="c16">,</b>&nbsp;<b class="c4">value</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">props</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">props</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">props</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">e</b><b class="c8">[</b><b class="c256">props</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">value</b><b class="c16">;</b>&nbsp;&nbsp;<b class="c1">return</b><b class="c16">;</b>&nbsp;<b class="c16">}</b>&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c8">.</b><b class="c4">tagName</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'SELECT'</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c4">name</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'value'</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c4">options</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c8">.</b><b class="c4">options</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">value</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">value</b><b class="c16">)</b>&nbsp;<b class="c16">{</b><b class="c256">e</b><b class="c8">.</b><b class="c4">selectedIndex</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">i</b><b class="c16">;</b>&nbsp;<b class="c1">break</b><b class="c16">;</b><b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c8">.</b><b class="c256">attributes</b>&nbsp;<b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c256">attributes</b><b class="c8">[</b><b class="c4">name</b><b class="c8">]</b><b class="c8">.</b><b class="c256">nodeValue</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">value</b><b class="c16">;</b>&nbsp;<b class="c1">return</b><b class="c16">;</b><b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">e</b><b class="c8">.</b><b class="c4">setAttribute</b>&nbsp;<b class="c16">(</b><b class="c4">name</b><b class="c16">,</b>&nbsp;<b class="c64">""</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c4">value</b><b class="c16">)</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 设置一个Dom Element的属性，参见：<a href='base.html#$.getAttribute'>$.getAttribute</a>;<br/> </p></dd><dt><b class="function_head"><a name="$.Effect.Transitions.flicker" href="#$.Effect.Transitions.flicker">$.Effect.Transitions.flicker</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">flicker</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c16">(</b><b class="c16">(</b><b class="c8">-</b><b class="c2">Math</b><b class="c8">.</b><b class="c4">cos</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">PI</b><b class="c16">)</b>&nbsp;<b class="c8">/</b>&nbsp;<b class="c128">4</b><b class="c16">)</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c128">0</b><b class="c8">.</b><b class="c128">75</b><b class="c16">)</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">random</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c8">/</b>&nbsp;<b class="c128">4</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Effect.Transitions.linear" href="#$.Effect.Transitions.linear">$.Effect.Transitions.linear</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">linear</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">pos</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Effect.Transitions.pulse" href="#$.Effect.Transitions.pulse">$.Effect.Transitions.pulse</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">pulse</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c16">(</b><b class="c2">Math</b><b class="c8">.</b><b class="c4">floor</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c128">10</b><b class="c16">)</b>&nbsp;<b class="c8">%</b>&nbsp;<b class="c128">2</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b>&nbsp;<b class="c8">?</b>&nbsp;&nbsp;<b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c128">10</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">floor</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c128">10</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c128">10</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">floor</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c128">10</b><b class="c16">)</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Effect.Transitions.reverse" href="#$.Effect.Transitions.reverse">$.Effect.Transitions.reverse</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c4">reverse</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">-</b>&nbsp;<b class="c256">pos</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Effect.Transitions.sinoidal" href="#$.Effect.Transitions.sinoidal">$.Effect.Transitions.sinoidal</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">sinoidal</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c16">(</b><b class="c8">-</b><b class="c2">Math</b><b class="c8">.</b><b class="c4">cos</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">PI</b><b class="c16">)</b>&nbsp;<b class="c8">/</b>&nbsp;<b class="c128">2</b><b class="c16">)</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c128">0</b><b class="c8">.</b><b class="c128">5</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Effect.Transitions.wobble" href="#$.Effect.Transitions.wobble">$.Effect.Transitions.wobble</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Effect</b><b class="c8">.</b><b class="c256">Transitions</b><b class="c8">.</b><b class="c256">wobble</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">pos</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c16">(</b><b class="c8">-</b><b class="c2">Math</b><b class="c8">.</b><b class="c4">cos</b><b class="c16">(</b><b class="c256">pos</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c2">Math</b><b class="c8">.</b><b class="c4">PI</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c16">(</b><b class="c128">9</b>&nbsp;<b class="c8">*</b>&nbsp;<b class="c256">pos</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c8">/</b>&nbsp;<b class="c128">2</b><b class="c16">)</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c128">0</b><b class="c8">.</b><b class="c128">5</b><b class="c16">;</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd></dl><div id="name_index"><h3><a name="#name_index">名称索引</a><dl><dd><a href='#window.$break'>$break</a></dd><dd><a href='#window.$continue'>$continue</a></dd><dd><a href='#window.$EXPORT'>$EXPORT</a></dd><dd><a href='#window.$version'>$version</a></dd><dd><a href='#$.error'>$.error</a></dd><dd><a href='#$.events'>$.events</a></dd><dd><a href='#$.props'>$.props</a></dd><dd><a href='#$.Effect.Transitions.EXPORT'>$.Effect.Transitions.EXPORT</a></dd><dd><a href='#window.$'>$</a></dd><dd><a href='#window.$A'>$A</a></dd><dd><a href='#window.$E'>$E</a></dd><dd><a href='#window.$export'>$export</a></dd><dd><a href='#$.clone'>$.clone</a></dd><dd><a href='#$.dataQuery'>$.dataQuery</a></dd><dd><a href='#$.doException'>$.doException</a></dd><dd><a href='#$.effect'>$.effect</a></dd><dd><a href='#$.empty'>$.empty</a></dd><dd><a href='#$.extend'>$.extend</a></dd><dd><a href='#$.getAttribute'>$.getAttribute</a></dd><dd><a href='#$.getElements'>$.getElements</a></dd><dd><a href='#$.getElementsByClassName'>$.getElementsByClassName</a></dd><dd><a href='#$.geval'>$.geval</a></dd><dd><a href='#$.gid'>$.gid</a></dd><dd><a href='#$.isArray'>$.isArray</a></dd><dd><a href='#$.isElement'>$.isElement</a></dd><dd><a href='#$.isEvent'>$.isEvent</a></dd><dd><a href='#$.isFunction'>$.isFunction</a></dd><dd><a href='#$.isNumber'>$.isNumber</a></dd><dd><a href='#$.isObject'>$.isObject</a></dd><dd><a href='#$.isString'>$.isString</a></dd><dd><a href='#$.isStringOrNumber'>$.isStringOrNumber</a></dd><dd><a href='#$.jeval'>$.jeval</a></dd><dd><a href='#$.K'>$.K</a></dd><dd><a href='#$.require'>$.require</a></dd><dd><a href='#$.run'>$.run</a></dd><dd><a href='#$.setAttribute'>$.setAttribute</a></dd><dd><a href='#$.Effect.Transitions.flicker'>$.Effect.Transitions.flicker</a></dd><dd><a href='#$.Effect.Transitions.linear'>$.Effect.Transitions.linear</a></dd><dd><a href='#$.Effect.Transitions.pulse'>$.Effect.Transitions.pulse</a></dd><dd><a href='#$.Effect.Transitions.reverse'>$.Effect.Transitions.reverse</a></dd><dd><a href='#$.Effect.Transitions.sinoidal'>$.Effect.Transitions.sinoidal</a></dd><dd><a href='#$.Effect.Transitions.wobble'>$.Effect.Transitions.wobble</a></dd></dl></h3></div><div id="pop_up"><a href="#name_index">查看名称索引</a></div></div>
</body>
</html>
